﻿namespace Magic.System;

public interface IMenuService 
{
    Task<List<MenuOutput>> GetTree(List<int> ids=null, bool all = false,string queck_search="");
    Task<dynamic> GetPageList(MenuInput input);
    /// <summary>
    /// 根据Id返回菜单
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<dynamic> Get(int id);
    /// <summary>
    /// 删除菜单规则
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task Delete(List<int> ids);
    /// <summary>
    /// 新增菜单规则
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    Task Add(AddMenuRuleInput input);
    /// <summary>
    /// 编辑菜单规则
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    Task Edit(EditMenuRuleInput input);
    /// <summary>
    /// 菜单排序
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    Task Sort(SortMenuRuleInput input);
    /// 获取所有权限集合
    /// </summary>
    /// <returns></returns>
    Task<List<string>> GetAllPermission();
    /// <summary>
    /// 获取权限缓存（按钮）
    /// </summary>
    /// <param name="userId"></param>
    /// <returns></returns>
    Task<List<string>> GetPermission(long userId);
}
